﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="imagelist.aspx.cs" Inherits="sysadmin_Product_imagelist" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>新增用户</title>
    <style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
-->
</style>

    <script src="../../javascript/jquery-1.3.2.min.js" type="text/javascript"></script>
    <link href="../images/skin.css" rel="stylesheet" type="text/css" />
    <link href="../../css/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <!--头部开始-->
  <tr>
    <td width="17" valign="top" background="../images/mail_leftbg.gif"><img src="../images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="../images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31" width="100%"> <div class="titlebt">图片列表</div>  </td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="../images/mail_rightbg.gif"><img src="../images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
   <!--头部结束-->
  <tr>
    <td valign="middle" background="../images/mail_leftbg.gif"></td>
    <td valign="top" bgcolor="#F7F8F9">
    <!--内容开始-->
  
  <hr />
    <asp:Button runat="server" ID="btn" Text="批量删除" CssClass="ACT_btn" 
            OnClientClick="return GetChecked()" onclick="btn_Click"  />
              <asp:Button runat="server" ID="btnReturn" Text="返回" CssClass="ACT_btn" 
            Visible="false" onclick="btnReturn_Click"  />
    
<table class="mytable" width="100%" cellspacing="0" summary="The technical specifications of the Apple PowerMac G5 series"> 
<caption> </caption> 
<tr> 
<th scope="col"><input type="checkbox" id="selectAll" onclick="checkAll()" />全选</th>
<th scope="col">序号</th> 
<th scope="col">产品编号</th> 
<th scope="col">小图</th> 
<th scope="col">删除</th>
</tr> 
<asp:Repeater runat="server" ID="rptList" onitemcommand="rptList_ItemCommand" >
<ItemTemplate>
<tr> 
<td class="row"><input type="checkbox" name="imgcheck" value='<%# Eval("ID") %>' /></td> 
<td class="row"><%# Container.ItemIndex + 1%></td> 
<td class="row"><%# Eval("OrderNo") %></td> 
<td class="row"><img src='../../images/product/<%# Eval("SmallImg") %>' /></td> 
<td class="row"><img src="../images/del.png" style="border:0px" /><asp:LinkButton runat="server" ID="lnkdel" Text="删除" CommandArgument='<%# Eval("ID") %>' CommandName="del" OnClientClick="javascript:return confirm('确认删除？')"></asp:LinkButton> </a></td> 
</tr> 
</ItemTemplate>
</asp:Repeater>
</table> 
    
      <webdiyer:AspNetPager ID="Pager" runat="server" Style="color: #7f6d4d; font-size: 12px;" UrlPaging="true"
        ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" Width="100%" PageIndexBoxStyle="width:19px"
        FirstPageText="【首页】" LastPageText="【尾页】" NextPageText="【后页】" PrevPageText="【前页】"
        ShowCustomInfoSection="Left" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到第"
        PageSize="100" CustomInfoHTML="第 <font color='red'><b>%CurrentPageIndex%</b></font> 页 共 %PageCount% 页 显示 %StartRecordIndex%-%EndRecordIndex% 条"
        >
    </webdiyer:AspNetPager>
      <!--内容结束-->
    </td>
    <td background="../images/mail_rightbg.gif"></td>
  </tr>
  
  
  <!--底部开始-->
  <tr>
    <td valign="bottom" background="../images/mail_leftbg.gif"><img src="../images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="../images/buttom_bgs.gif"><img src="../images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="../images/mail_rightbg.gif"><img src="../images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
  <!--底部结束-->
</table>
<input type="hidden" runat="server" id="hiddenIDList" />
    </form>
</body>
<script language="javascript" type="text/javascript">
 function checkAll()
 {
   if($("#selectAll").attr("checked")==true)
   {
     $("input[name='imgcheck']").each(function(){
        this.checked=true;
     })
   }else
   {
       $("input[name='imgcheck']").each(function(){
        this.checked=false;
     })
   }
 }
 
 function GetChecked()
 {
   var IDList="";
   if(confirm("确认批量删除？"))
   {
       $("input[name='imgcheck']").each(function(){
           if(this.checked)
           {
             IDList +=this.value+",";
           }
       });
       if(IDList=="")
       {
         alert("没有选择删除项！");
         return false;
       }else
       {
         $('#<%= hiddenIDList.ClientID %>').val(IDList);
         return true;
       }
      
   }else
   {
    return false;
   }
 }
</script>
</html>

